package com.member.common.enums;


import lombok.Getter;

import java.util.Objects;

@Getter
public enum OrderDeleteEnum {
    NOT_DELETE(0, "未删除"),
    DELETE( 1, "已删除"),
    ;

    private final Integer key;
    private final String desc;

    OrderDeleteEnum(Integer key, String desc) {
        this.key = key;
        this.desc = desc;
    }

    public static OrderDeleteEnum getByKey(Integer _key){
        for (OrderDeleteEnum item : OrderDeleteEnum.values()){
            if(Objects.equals(item.getKey(), _key)){
                return item;
            }
        }
        return null;
    }

}
